package com.duobao.server;
import java.util.Vector;

import com.duobao.uitl.Zuanhuan;

public class Equip
{
    protected int category;//装备类别：1为刀，2为剑，3为拳，4为杖，5斧法,6为戟，7为甲，8为衣，9为靴，10为黄金，11为银子，12为铜板，13为书,14尸体,15昏迷
    protected String name;//装备名字
    protected String describe;//装备描述
    protected int Maxendurance;//装备最高耐久读
    protected int endurance;//装备耐久读
    protected int recency;//装备崭新度
    protected int ATK;//装备攻击力
    protected int DEF;//装备防御力
    protected int dodge;//装备闪躲力
    protected String wugongName;//书籍所蕴含的的武功
    protected boolean ZB;//装备是否装备
    protected int FZ;//装备负重
    protected int JZH;//价值黄金
    protected int JZB;//价值白银
    protected int JZT;//价值铜板
    protected Vector ve;//物品所在地
    protected long DQTime;//丢弃时间
    protected int location;//物品在所在地
    public Equip(int category,String name,String describe,int endurance,int Maxendurance,int recency,int ATK,int DEF,int dodge,boolean ZB)
    {
        this.category = category;
        this.name = name;
        this.describe = describe;
        this.Maxendurance = Maxendurance;
        this.endurance = endurance;
        this.recency = recency;
        this.ATK = ATK;
        this.DEF = DEF;
        this.dodge = dodge;
        this.ZB = ZB;
    }
    public String getMsName()
    {
        String s = null;
        if(this.getCategory()==1||this.getCategory()==2||this.getCategory()==5 || this.getCategory()==6)
        {
            s ="一把"+this.getName();
        }else if(this.getCategory()==13)
        {
            s ="一本"+this.getName();
        }else if(this.getCategory()==14)
        {
            s ="一具"+this.getName();
        }else if(this.getCategory()==15)
        {
            s =this.getName();
        }else if(this.getCategory()==4)
        {
            s ="一根"+this.getName();
        }else if(this.getCategory()==3||this.getCategory()==9)
        {
            s ="一双"+this.getName();
        }else if(this.getCategory()==8||this.getCategory()==7)
        {
            s ="一件"+this.getName();
        }else if(this.getCategory()==10||this.getCategory()==11||this.getCategory()==12)
        {
            if(this.getCategory()==10)
            {
                s =Zuanhuan.zhuang(this.JZH)+"两"+this.getName();
            }else if(this.getCategory()==11)
            {

                s =Zuanhuan.zhuang(this.JZB)+"两"+this.getName();
            }else if(this.getCategory()==12)
            {

                s =Zuanhuan.zhuang(this.JZT)+"文"+this.getName();
            }
        }
        return s;
    }
    public boolean ifWuqi()//判断是否为武器
    {
        boolean b=false;
        switch(this.category)
        {
            case 1:b=true;break;
            case 2:b=true;break;
            case 3:b=true;break;
            case 4:b=true;break;
            case 5:b=true;break;
            case 6:b=true;break;
            default:b=false;
        }
        return b;
    }
    public boolean ifYiXie()//判断是否为衣甲鞋
    {
        boolean b=false;
        switch(this.category)
        {
            case 7:b=true;break;
            case 8:b=true;break;
            case 9:b=true;break;
            default:b=false;
        }
        return b;
    }
    public boolean ifHuoBi()//判断是否为货币
    {
        boolean b=false;
        switch(this.category)
        {
            case 10:b=true;break;
            case 11:b=true;break;
            case 12:b=true;break;
            default:b=false;
        }
        return b;
    }
    public boolean ifShuji()//判断是否为书籍
    {
        boolean b=false;
        switch(this.category)
        {
            case 13:b=true;break;
            default:b=false;
        }
        return b;
    }
    public boolean ifqita()//判断是否为其它
    {
        boolean b=false;
        switch(this.category)
        {
            case 14:b=true;break;
            default:b=false;
        }
        return b;
    }
    public boolean ifhunmi()//判断是否为其它
    {
        boolean b=false;
        switch(this.category)
        {
            case 15:b=true;break;
            default:b=false;
        }
        return b;
    }
    public Vector getVe() {
        return ve;
    }

    public int getLocation() {
        return location;
    }
    public void setLocation(int location) {
        this.location = location;
    }
    public void setVe(Vector ve) {
        this.ve = ve;
    }
    public String getWugongName() {
        return wugongName;
    }
    public void setWugongName(String wugongName) {
        this.wugongName = wugongName;
    }
    public long getDQTime() {
        return DQTime;
    }
    public void setDQTime(long dQTime) {
        DQTime = dQTime;
    }
    public int getJZH() {
        return JZH;
    }
    public void setJZH(int jZH) {
        JZH = jZH;
    }
    public int getJZB() {
        return JZB;
    }
    public void setJZB(int jZB) {
        JZB = jZB;
    }
    public int getJZT() {
        return JZT;
    }
    public void setJZT(int jZT) {
        JZT = jZT;
    }
    public int getFZ() {
        return FZ;
    }
    public void setFZ(int fZ) {
        FZ = fZ;
    }
    public boolean isZB() {
        return ZB;
    }
    public void setZB(boolean zB) {
        ZB = zB;
    }
    public int getCategory() {
        return category;
    }
    public void setCategory(int category) {
        this.category = category;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    public int getEndurance() {
        return endurance;
    }
    public void setEndurance(int endurance) {
        this.endurance = endurance;
    }
    public int getRecency() {
        return recency;
    }
    public void setRecency(int recency) {
        this.recency = recency;
    }
    public int getATK() {
        return ATK;
    }
    public void setATK(int aTK) {
        ATK = aTK;
    }
    public int getDEF() {
        return DEF;
    }
    public void setDEF(int dEF) {
        DEF = dEF;
    }
    public int getDodge() {
        return dodge;
    }
    public void setDodge(int dodge) {
        this.dodge = dodge;
    }
    public int getMaxendurance() {
        return Maxendurance;
    }
    public void setMaxendurance(int maxendurance) {
        Maxendurance = maxendurance;
    }
}
